package com.ww.java.generic.method;

/**
 * @author wanggw
 * @Date 2023年01月01 17:45
 */
public class CountedObject {
    private static long counter = 0;

    private final long id = counter++;

    public long id() {
        return id;
    }

    @Override
    public String toString() {
        return "CountedObject " + id;
    }
}
